
FROM alpine:3.14

RUN apk add --no-cache openjdk8 --repository http://mirrors.ustc.edu.cn/alpine/v3.4/main/ && rm -f /etc/apk/repositories

ENV TZ=Asia/Shanghai \ 
  LANG=C.UTF-8 \
  JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk \
  PATH=$PATH:$JAVA_HOME/jre/bin \
  run_foreground=false

EXPOSE 8888

WORKDIR /usr/local/app/
COPY *.jar /usr/local/app/app.jar

CMD ["java", "-jar", "-Duser.timezone=GMT+0", "app.jar", "--server.port=8888"]
